package com.dwy2002.room;

import com.dwy2002.common.Result;
import com.dwy2002.pojo.vo.rooms.RoomsVO;
import com.dwy2002.room.service.IReservationService;
import lombok.RequiredArgsConstructor;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

/**
 * @author 杜伟毅
 * @version 1.0
 * @since 2025/04/02
 */
@RestController
@RequestMapping("/reservation")
@RequiredArgsConstructor
public class ReservationsController {
    private final IReservationService service;

    /**
     * 返回用户全部预约包间
     *
     * @author 杜伟毅
     * @since 2025/4/2 0002 16:58
     */
    @GetMapping("/me/reservations")
    public Result<List<RoomsVO>> getBookedRooms() {
        return service.getBookedRooms();
    }
}
